<?php
/**
 * Inteface for import classes
 *
 * Copyright (C) 2008  Sean Hickey
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Sean Hickey <sean@headzoo.com>
 * @version $Id: Interface.php 391 2008-07-03 05:42:56Z sean $
 * @package Alinks_ImportExport
 */
interface Alinks_ImportExport_Import_Interface
{
	/**
	 * Sets the import options
	 *
	 * @param array $options The import options
	 * @return Alinks_ImportExport_Import_Interface
	 */
	function setOptions(array $options);
	
	/**
	 * Adds a single import option
	 *
	 * @param string $key The option key
	 * @param mixed $value The option value
	 * @return Alinks_ImportExport_Import_Interface
	 */
	function addOption($key, $value);
	
	/**
	 * Returns the import options
	 *
	 * If $key is specified, then only the option value for that
	 * key will be returned. Otherwise the full array of options
	 * will be returned.
	 *
	 * @param string $key The option key
	 * @return mixed
	 * @throws Alinks_ImportExport_Import_Exception
	 */
	function getOptions($key = null);
	
	/**
	 * Imports the data
	 *
	 * @param string $data The import data
	 * @return bool
	 * @throws Alinks_ImportExport_Import_Exception
	 */
	function import($data);
}